import Vue from 'vue'
import Router from 'vue-router'
import Signin from '@/components/SignIn/SignIn'
const Home = () => import(/* webpackChunkName: "Home" */ '@/components/Home/Home')
const PermissionManage = () => import(/* webpackChunkName: "PermissionManage" */ '@/components/Home/System/PermissionManage')
const RoleManage = () => import(/* webpackChunkName: "RoleManage" */ '@/components/Home/System/RoleManage')
const AccountManage = () => import(/* webpackChunkName: "AccountManage" */ '@/components/Home/System/AccountManage')
const CaiPiao = () => import(/* webpackChunkName: "CaiPiao" */ '@/components/Home/CaiPiao/CaiPiao')

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: {name: 'Home'}
    },
    {
      path: '/Home',
      component: Home,
      name: 'Home',
      children: [
      	{
      		path:'AccountManage',
      		name:'用户管理',
      		component:AccountManage
      	},
      	{
      		path:'RoleManage ',
      		name:'角色管理',
      		component:RoleManage
      	},
        {
        	path:'PermissionManage',
        	name:'权限管理',
        	component:PermissionManage
        },
        {
        	path:'CaiPiao',
        	name:'彩票列表',
        	component:CaiPiao
        }
      ]
    },
    {
       path: '/Signin',
       name: 'Signin',
       component: Signin
     }
  ]
})
